<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Insert title here</title>
</head>
<body>
<div id="box">
    <div class="nav">
        <ul>
            <li>薪资管理</li>
            <li>/</li>
            <li>修改薪资</li>
        </ul>
    </div>
    <form id="box1">
        <p>职位：<input type="text" name="position" id="position"></p>
        <p>薪资：<input type="text" name="salaryDesc" id="salaryDesc"></p>
        <input type="button" value="修改" onclick="add()">
    </form>
</div>
<script>
    function add() {
        var position = $("#position").val();
        var salaryDesc = $("#salaryDesc").val();
        $.get("/web/salary", {op: "update", salaryDesc: salaryDesc, position: position,salaryId:updateId}, function (data) {
            $("#content").load("salary/salary-list.html");
            alert(data);
        });
    }
    $(function () {
        $.get("/web/salary", {op: "input", salaryId: updateId}, function (data) {
            $("#position").val(data.position);
            $("#salaryDesc").val(data.salaryDesc);
        })
    });
</script>
</body>
</html>